﻿#pragma once
#include <string>
#include <vector>

class OnHIDErrorListener {
public:
  virtual void onHIDError(int errorCode, std::string errMsg) = 0;
};

class OnHIDReadFileListener {
public:
  virtual void onHIDReadFileResult(std::string filePath, std::string tag,
                                   int progress, long maxProgress,
                                   bool completed) = 0;

  virtual void onHIDReadFileFailed(int errorCode, std::string errMsg) = 0;
};

class OnHIDReadRandomFileListener {
public:
  virtual void onHIDReadRandomFileResult(std::string filePath,
                                         bool completed) = 0;

  virtual void onHIDReadRandomCancel(std::string filePath) = 0;

  virtual void onHIDReadRandomPause(bool paused) = 0;

  virtual void onHIDReadRandomFailed(int errorCode, std::string errMsg) = 0;
};

class OnHIDWriteRandomFileListener {
public:
  virtual void onHIDWriteRandomStart() = 0;
  virtual void onHIDWriteRandomFailed(int errorCode, std::string errMsg) = 0;
  virtual void onHIDWriteRandomCompleted() = 0;
};

class OnHIDFrameListener {
public:
  virtual void onHIDFrameFrame(char cmd, const std::vector<char> &data,
                               std::string tag) = 0;

  virtual void onHIDFrameFailed(int errorCode, std::string errMsg) = 0;
};

class OnHIDWriteListener {
public:
  virtual void onHIDWriteResult(int progress, long totalProgress,
                                bool completed) = 0;

  virtual void onHIDWriteFailed(int errorCode, std::string errMsg) = 0;
};

class OnHIDStopDataListener {
public:
  virtual void onHIDStopData() = 0;
};
